package com.turing.service.impl;

import com.turing.domain.CategoryOne;
import com.turing.mapper.CategoryOneMapper;
import com.turing.service.ICategoryOneService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 *
 */
@Service
public class CategoryOneServiceImpl implements ICategoryOneService {

    @Autowired
    private CategoryOneMapper categoryOneMapper;

    @Override
    public List<CategoryOne> selectAll() {
        return categoryOneMapper.selectList();
    }

    @Override
    public CategoryOne selectById(Long id) {
        return categoryOneMapper.selectByPrimaryKey(id);
    }

    @Override
    public int insertOne(CategoryOne categoryOne) {
        return categoryOneMapper.insertSelective(categoryOne);
    }

    @Override
    public int updateById(CategoryOne categoryOne) {
        return categoryOneMapper.updateByPrimaryKeySelective(categoryOne);
    }

    @Override
    public int deleteByIds(Long[] ids) {
        return categoryOneMapper.deleteByPrimaryKey(ids);
    }

    @Override
    public List<CategoryOne> selectPage(CategoryOne categoryOne) {
        return categoryOneMapper.selectPage(categoryOne);
    }
}
